package com.jiangjiang.eshop.order.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.jiangjiang.eshop.order.dto.OrderItemDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @ClassName OrderInfoEntity
 * @Description TODO
 * @Author jhw
 * @Date 2021/7/24 11:12
 * @Version 1.0
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("order_info")
public class OrderInfoEntity {
    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 订单编号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 用户账号id
     */
    @TableField("user_account_id")
    private Long userAccountId;
    /**
     * 用户名
     */
    @TableField("username")
    private String username;
    /**
     * 订单状态
     */
    @TableField("order_status")
    private Integer orderStatus;
    /**
     * 收货人
     */
    @TableField("consignee")
    private String consignee;
    /**
     * 收货地址
     */
    @TableField("delivery_address")
    private String deliveryAddress;
    /**
     * 收货人手机号码
     */
    @TableField("consignee_cell_phone_number")
    private String consigneeCellPhoneNumber;
    /**
     * 运费
     */
    @TableField("freight")
    private Double freight;
    /**
     * 支付方式
     */
    @TableField("pay_type")
    private Integer payType;
    /**
     * 订单总金额
     */
    @TableField("total_amount")
    private Double totalAmount;
    /**
     * 促销活动减免金额
     */
    @TableField("discount_amount")
    private Double discountAmount;
    /**
     * 优惠券减免金额
     */
    @TableField("coupon_amount")
    private Double couponAmount;
    /**
     * 应付金额
     */
    @TableField("payable_amount")
    private Double payableAmount;
    /**
     * 发票抬头
     */
    @TableField("invoice_title")
    private String invoiceTitle;
    /**
     * 纳税人识别号
     */
    @TableField("taxpayer_id")
    private String taxpayerId;
    /**
     * 订单备注
     */
    @TableField("order_comment")
    private String orderComment;
    /**
     * 是否发表了评论
     */
    @TableField("is_published_comment")
    private Integer publishedComment;
    /**
     * 确认收货时间
     */
    @TableField("confirm_receipt_time")
    private Date confirmReceiptTime;
    /**
     * 使用的优惠券id
     */
    @TableField("coupon_id")
    private Long couponId;
    /**
     * 销售出库单的创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    private Date gmtCreate;
    /**
     * 销售出库单的修改时间
     */
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
